﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Reflection;

namespace nRoute.Samples.Netflix.Views
{
    /// <summary>
    /// Interaction logic for AboutWindow.xaml
    /// </summary>
    public partial class AboutWindow : Window
    {
        private const string TIER_INFO_FORMAT = "Rendering in Tier {0}";
        private const string VERSION_INFO_FORMAT = "Version {0}";

        public AboutWindow()
        {
            InitializeComponent();
            var _attribute = (AssemblyFileVersionAttribute)(Attribute.GetCustomAttribute(this.GetType().Assembly, typeof(AssemblyFileVersionAttribute)));
            this.VersionInfoText.Text = String.Format(VERSION_INFO_FORMAT, _attribute.Version);
            this.TierInfoText.Text = String.Format(TIER_INFO_FORMAT, RenderCapability.Tier / 0x10000);
        }

        private void CloseWindow_Click(object sender, System.Windows.RoutedEventArgs e)
        {
        	this.Close();
        }
    }
}
